const registerRouter = require('./backend/router')
module.exports = {
  css: {
    loaderOptions: {
      sass: {
        additionalData: `
          @import "@/assets/scss/variable";
          @import "@/assets/scss/mixin";
        `
      }
    }
  },
  publicPath: '/',
  productionSourceMap: false,
  // configureWebpack: config => {
  //   if (process.env.NODE_ENV === 'production') {
  //     config.optimization.minimizer[0].options.terserOptions.compress = true
  //   } else {
  //     config.devtool = 'source-map'
  //   }
  // },
  devServer: {
    before (app) {
      registerRouter(app)
    }
  }
}
